<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>JPush Phonegap Simple Demo</title>
    <link href="css/jquery.mobile-1.1.1.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/jquery.mobile-1.1.1.js"></script>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript">
       
      function scanCode() {
      cordova.plugins.barcodeScanner.scan(
      function (result) {
          alert("We got a barcode\n" +
                "Result: " + result.text + "\n" +
                "Format: " + result.format + "\n" +
                "Cancelled: " + result.cancelled);
      },
      function (error) {
          alert("Scanning failed: " + error);
      }
   );
}

    </script>
</head>
<body onload="scanCode()">
</body>

</html>
